﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PlaceOrder_Core.Models.QuanYi
{
    public class QuanyiClientTradeClass
    {
        public enum TradeStatus
        {
            NotTraded,      //未成交
            Withdrawing,    //撤单中
            Withdrawed,     //已撤单
            Traded,         //已成交
            Finished        //已平仓
        }
        public enum OrderTypeEnum
        {
            BaiDan,         //摆单，普通摆单，需等待当前实盘中同向摆单全部成交后才能判断模拟盘交易
            DaDan           //打单，下单时当前摆单中有此价格，成交等待期过后无需等待同向同价摆单成交，即可判断是否成交
        }
        //用户ID，与sys_user表中的用户对应
        public int UserID { get; set; }
        public string UserName { get; set; }
        public string NickName { get; set; }
        public int ID { get; set; }
        //券码
        public string TsCode { get; set; }
        //下单时间
        public DateTime OrderDate { get; set; }
        //成交时间
        public DateTime TradeDate { get; set; }
        //撤单时间
        public DateTime WithDrawDate { get; set; }
        //下单价格
        public decimal Price { get; set; }
        //下单价净价
        public decimal NetPrice { get; set; }
        //下单量
        public int Volume { get; set; }
        //折算PVBP后的实际量
        public int RealVolume { get; set; }
        //当前未成交数量
        public int OnHoldVolume { get; set; }
        //下单类型，TKN买入，GVN卖出
        public string DealType { get; set; }
        //交易结果，已成交，已撤单
        public string TradeResult { get; set; }
        //固盈
        public decimal Profit { get; set; }
        //交易状态
        public TradeStatus Status { get; set; }
        //对应平仓单ID
        public string OpponentID { get; set; }
        public decimal PVBP { get; set; }
        //浮动盈亏
        public decimal DynProfit { get; set; }
        //手续费率，暂未使用
        public decimal BrokeRage { get; set; }
        //下单类型
        public OrderTypeEnum OrderType { get; set; }
        public Guid Guid { get; set; }
        //当前已存在的未成交平仓单ID
        public int BalanceOrder { get; set; }
    }
}
